package com.jash.labor.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jash.labor.entity.Company;
import com.jash.labor.mapper.provider.SqlCompanyProvider;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.List;

@Mapper
@Repository
public interface CompanyMapper extends BaseMapper<Company> {
    //查询用工单位列表
        @Select("select f.name fname from first_party f where f.company_id = #{companyid};")
    public List<HashMap> queryFirstPartylist(Integer companyid);
        //查询用工单位详细信息
        @Select("SELECT c.name , c.address , c.content from company c where c.id =#{companyid};")
    public List<HashMap> companyQueryFirstPartylistById(Integer companyid);


    @SelectProvider(value = SqlCompanyProvider.class,method = "companyQueryStationList")
    public List<HashMap> companyQueryStationList(String content);
}

